package com.qiall.oms.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/qiall/appManage")
public class AppManageController {
    @Autowired
    private AppNodeService appNodeService;

    @GetMapping("/startApp")
    public String startApp() {
        return appNodeService.startService();
    }

    @GetMapping("/stopApp")
    public String stopApp() {
        return appNodeService.shutDownService();
    }

    @GetMapping("/getHealthInfo")
    public String getHealthInfo() {
        return appNodeService.getServiceHealthInfo();
    }

}
